//
//  Packet.m
//  PacketSniffer
//
//  Created by nark on 16/04/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "PSPacket.h"

@implementation PSPacket

@synthesize length;
@synthesize capturedLength;
@synthesize dateReceived;

- (id)initWithLength:(int)_length
{
	self = [super init];
	if (self != nil) {
		self.length		= _length;
	}
	return self;
}

- (NSMutableDictionary *)properties {
	NSMutableDictionary *propertyDict = [[NSMutableDictionary alloc] init];

	[propertyDict setValue:[NSString stringWithFormat:@"%d", self.length]
					forKey:@"Length"];
	
	[propertyDict setValue:[NSString stringWithFormat:@"%d", self.capturedLength]
					forKey:@"Captured Length"];
	
	[propertyDict setValue:[NSString stringWithFormat:@"%d", self.dateReceived]
					forKey:@"Date Received"];

	return propertyDict;
}

@end
